
const TokenKey = 'Wx-Token'
const UserKey = 'userId'

const ExpiresInKey = 'Wx-Expires-In'
const NickNameKey = 'nickName'
const AvatarUrlKey = 'avatarUrl'
const BackgroundUrlKey = 'backgroundUrl'
const LocationKey = 'location'

export function getNickName() {
  return uni.getStorageSync(NickNameKey)
}
export function setNickName(NickName) {
  return uni.setStorageSync(NickNameKey,NickName)
}

export function removeNickName() {
  return uni.removeStorageSync(NickNameKey)
}

export function getLocation() {
  return uni.getStorageSync(LocationKey)
}
export function setLocation(Location) {
  return uni.setStorageSync(LocationKey,Location)
}

export function removeLocation() {
  return uni.removeStorageSync(LocationKey)
}

export function getAvatarUrl() {
  return uni.getStorageSync(AvatarUrlKey)
}

export function setAvatarUrl(AvatarUrl) {
  return uni.setStorageSync(AvatarUrlKey,AvatarUrl)
}
export function removeAvatarUrl() {
  return uni.removeStorageSync(AvatarUrlKey)
}

export function getBackgroundUrl() {
  return uni.getStorageSync(BackgroundUrlKey)
}

export function setBackgroundUrl(BackgroundUrl) {
  return uni.setStorageSync(BackgroundUrlKey,BackgroundUrl)
}
export function removeBackgroundUrl() {
  return uni.removeStorageSync(BackgroundUrlKey)
}

export function getUserId() {
  return uni.getStorageSync(UserKey)
}

export function setUserId(UserId) {
  return uni.setStorageSync(UserKey, UserId)
}

export function removeUserId() {
  return uni.removeStorageSync(UserKey)
}

export function getToken() {
  return uni.getStorageSync(TokenKey)
}

export function setToken(token) {
  return uni.setStorageSync(TokenKey, token)
}

export function removeToken() {
  return uni.removeStorageSync(TokenKey)
}

export function getExpiresIn() {
  return uni.getStorageSync(ExpiresInKey) || -1
}

export function setExpiresIn(time) {
  return uni.setStorageSync(ExpiresInKey, time)
}

export function removeExpiresIn() {
  return uni.removeStorageSync(ExpiresInKey)
}
